package com.whfc.iot.mach.event;

import org.springframework.context.ApplicationEvent;

/**
 * 硬件上线事件
 */
public class DeviceOnlineEvent extends ApplicationEvent {

    /**
     * 硬件类型
     */
    private int deviceType;

    /**
     * 硬件ID
     */
    private int deviceId;

    /**
     * 序列号
     */
    private int seq;

    /**
     * 主机版本号
     */
    private String masterVer;

    /**
     * 从机版本号
     */
    private String slaveVer;


    public DeviceOnlineEvent(int deviceType, int deviceId, int seq, String masterVer, String slaveVer) {
        super(deviceId);
        this.deviceType = deviceType;
        this.deviceId = deviceId;
        this.seq = seq;
        this.masterVer = masterVer;
        this.slaveVer = slaveVer;
    }

    public DeviceOnlineEvent(int deviceType, int deviceId, int seq, String masterVer) {
        super(deviceId);
        this.deviceType = deviceType;
        this.deviceId = deviceId;
        this.seq = seq;
        this.masterVer = masterVer;
    }

    public int getDeviceType() {
        return deviceType;
    }

    public void setDeviceType(int deviceType) {
        this.deviceType = deviceType;
    }

    public int getDeviceId() {
        return deviceId;
    }

    public void setDeviceId(int deviceId) {
        this.deviceId = deviceId;
    }

    public int getSeq() {
        return seq;
    }

    public void setSeq(int seq) {
        this.seq = seq;
    }

    public String getMasterVer() {
        return masterVer;
    }

    public void setMasterVer(String masterVer) {
        this.masterVer = masterVer;
    }

    public String getSlaveVer() {
        return slaveVer;
    }

    public void setSlaveVer(String slaveVer) {
        this.slaveVer = slaveVer;
    }
}
